
{extend name="index/admin-index" /}
{block name="main"}

  <link rel="stylesheet" href="/public/static/assets/css/bootstrap.css">
  <script src="/public/static/assets/js/jquery.min.js"></script>
  <!-- content start -->
  <div class="admin-content">
    <div class="admin-content-body">
      <div class="am-cf am-padding am-padding-bottom-0">
        <div class="am-fl am-cf"><strong class="am-text-primary am-text-lg">轮播图修改</strong> / <small>loop addition</small></div>
      </div>

      <hr/>

      <div style="margin-left:100px">



     <img src="/public/uploads/{$loop['path']}" alt="" width=250> <br>
    <strong class="am-text-primary am-text-lg">选择上传的图片 : &nbsp</strong><br><br>
       <form action="edit?id={$loop['id']}" enctype="multipart/form-data" method="post">
         <input type="file" name="image" /> <br>
                url链接 : <input type="text" name='url' value="{$loop['url']}"><br><br>
                <input type="submit" value="上传" class='btn btn-primary' style='color:#fff;' />
     
              
  
    <!-- <input type="submit" class="btn btn-info " style='float:right;'> -->
    
   
    </form>
    </div>
    </div>
    <script>
        $('#add').click(function(){
          var info1 = $('input[name="status"]:checked').val(); 
          var info = $('#Success').val();
          // console.log(info1);
          $.ajax({
            type:'post',
            url:'add',
            data:{
              'content':info,
              'status':info1,
            },
                
            
            success:function(d){
                if(d == 'ok'){
                    alert('添加成功');
                    window.location='index';
                }else if(d == 'no'){
                    alert('添加失败');
                }
                // console.log(d);
            }
          })
        })
</script>
{/block}